import org.antlr.runtime.*;
import org.antlr.runtime.tree.*;
import helpers.*;

public class TreeParser {
	public static final int XML_PARSER = 0;
    public static final int C_PARSER = 1;
	
	static final TreeAdaptor adaptor = new CommonTreeAdaptor() {
		public Object create(Token payload) {
			return new Arbolito(payload);
		}
	};
	
	public static void main(String[] args) {
		try {
		    Analex lex; 
			/*FileInputStream fis =
					new FileInputStream("entrada.txt");
					Analex analex = null;
					Anasint anasint = null;
					Evaluador evaluador = null;
					AST arbol = null;
					analex = new Analex(fis);
					anasint = new Anasint(analex);
					anasint.instrucciones();
					arbol = anasint.getAST();
					evaluador = new Evaluador();
					evaluador.instrucciones(arbol);*/
			


        	/*CLexer clexer = new CLexer(new ANTLRFileStream("test/prueba.c"));
            CommonTokenStream ctokens = new CommonTokenStream(clexer);
            CParser cparser = new CParser(ctokens);
            cparser.setTreeAdaptor(adaptor);
            CParser.entrada_return cret = cparser.entrada();
            Arbolito ctree = (Arbolito) cret.getTree();
            ASTFrame caf = new ASTFrame("test/prueba.c", ctree);
            caf.setVisible(true);*/

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
